import request from '@/utils/request'

//分页查询警令列表
export function pageList(data) {
    return request({
        url: '/warningOrder/toList.do',
        method: 'post',
        headers:{
            'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
        },
        data,
    })
}

//获取所有警令类型
export function typeList(data) {
    return request({
        url: '/warningType/toList.do',
        method: 'post',
        data,
    })
}


//获取所有警情类型
export function alarmList(data) {
    return request({
        url: '/alarmType/getAllList.do',
        method: 'post',
        data,
    })
}


//新增/修改警令
export function save(data) {
    return request({
        url: '/warningOrder/save.do',
        method: 'post',
        data,
    })
}

//ID查询
export function getById(data) {
    return request({
        url: '/warningOrder/getOneWarning.do',
        method: 'post',
        data,
    })
}

//删除警令
export function deleteOne(data) {
    return request({
        url: '/warningOrder/delete.do',
        method: 'post',
        data,
    })
}

//根据警令ID获取已经选择的部门
export function getAllChooseDept(data) {
    return request({
        url: '/warningOrder/getAllChooseDept.do',
        method: 'post',
        headers:{
            'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
        },
        data,
    })
}

//添加协同部门信息//编辑协同部门信息
export function editDept(data) {
    return request({
        url: '/warningOrder/editDept.do',
        method: 'post',
        data,
    })
}

//删除协同部门
export function deleteDept(data) {
    return request({
        url: '/warningOrder/deleteChooseDept.do',
        method: 'post',
        data,
    })
}

//发布警令协同
export function publishWarningOrder(data) {
    return request({
        url: '/warningOrder/publishWarningOrder.do',
        method: 'post',
        data,
    })
}

//撤回警令协同
export function backWarningOrder(data) {
    return request({
        url: '/warningOrder/backWarningOrder.do',
        method: 'post',
        data,
    })
}

//协同反馈督察(列表)
export function getPublishDeptList(data) {
    return request({
        url: '/warningOrder/getPublishDeptList.do',
        method: 'post',
        headers:{
            'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
        },
        data,
    })
}


//查询反馈详情
export function getOneDeptDetail(data) {
    return request({
        url: '/warningOrder/getOneDeptDetail.do',
        method: 'post',
        data,
    })
}


//督察保存
export function saveDeptPoint(data) {
    return request({
        url: '/warningOrder/saveDeptPoint.do',
        method: 'post',
        data,
    })
}

//督察通过
export function passDeptPoint(data) {
    return request({
        url: '/warningOrder/passDeptPoint.do',
        method: 'post',
        data,
    })
}

//督察驳回
export function backDeptPoint(data) {
    return request({
        url: '/warningOrder/backDeptPoint.do',
        method: 'post',
        data,
    })
}

//单条日志查询
export function getOneLog(data) {
    return request({
        url: '/warningOrder/getOneLog.do',
        method: 'post',
        data,
    })
}

//单条日志查询
export function getAllLog(data) {
    return request({
        url: '/warningOrder/getAllLog.do',
        method: 'post',
        data,
    })
}

//单个文件查询
export function getOneFile(data) {
    return request({
        url: '/file/getOneFile.do',
        method: 'post',
        data,
    })
}